﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SCS.Common.Models;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
namespace SchoolCommunicationSystem.Models
{
    public class SchoolYearsModel
    {
        public IEnumerable<SchoolYear> SchoolYears { get; set; }
        public int SchoolYearId { get; set; }
        public string UserName { get; set; }

        [Required(ErrorMessage = "Trường không được để trống")]
        [Display(Name = "Tên năm học mới:")]
        public string SchoolYearName { get; set; }

        [Required(ErrorMessage = "Trường không được để trống")]
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:dd-MM-yyyy}", ApplyFormatInEditMode = true)]
        public Nullable<System.DateTime> startDate { get; set; }

        [Required(ErrorMessage = "Trường không được để trống")]
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:dd-MM-yyyy}", ApplyFormatInEditMode = true)]
        public Nullable<System.DateTime> endDate { get; set; }

        public string termName { get; set; }
        public int termID { get; set; }
        public IEnumerable<SelectListItem> SchoolYearSelectList { get; set; }
        public IEnumerable<SelectListItem> TermSelectList { get; set; }
        public IList<Term> terms { get; set; }
    }
    public class TermModel
    {
        public IEnumerable<SchoolYear> SchoolYears { get; set; }

        [Required(ErrorMessage = "Trường không được để trống")]
        public int SchoolYearId { get; set; }
        public string UserName { get; set; }
        public string SchoolYearName { get; set; }
        public DateTime? startDate { get; set; }
        public DateTime? endDate { get; set; }
        public string termName { get; set; }

        public int termID { get; set; }

        public IEnumerable<SelectListItem> SchoolYearSelectList { get; set; }

        public IEnumerable<SelectListItem> TermSelectList { get; set; }
        public IList<Term> terms { get; set; }
    }
    public class ChangeClassModel
    {
        public int oldSchoolYearsID { get; set; }
        public int schoolYearsID { get; set; }
        public string oldSchoolYearsName { get; set; }
        public string newSchoolYearsName { get; set; }
        public List<ClassInNewSY> ClassInNewSchoolYear { get; set; }
    }
        public class ClassInNewSY
    {
        public int classID { get; set; }
        public string className { get; set; }
        public string NewClassName { get; set; }
    }
}